<template>
  <div class="demo">
    <div class="demo-title">基本用法</div>
    <div class="demo-content">
      <Popconfirm
        title="Are you sure delete this task?"
        ok-text="Yes"
        cancel-text="No"
        @confirm="confirm"
        @cancel="cancel"
      >
        <a href="#">Delete</a>
      </Popconfirm>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import Message from '@sscd/message';
  import Popconfirm from '@sscd/popconfirm';

  const confirm = (e: MouseEvent) => {
    console.log(e);
    Message.success('Click on Yes');
  };
  
  const cancel = (e: MouseEvent) => {
    console.log(e);
    Message.error('Click on No');
  };
</script>
